cmake_minimum_required(VERSION 3.10)
project(server_simulator)

set(CMAKE_CXX_STANDARD 11)

include_directories(include)

# 添加disk库的搜索路径
link_directories(../disk/build)

add_library(server_simulator SHARED src/server_simulator.cpp)
set_target_properties(server_simulator PROPERTIES OUTPUT_NAME "server_simulator")
# 强制生成 .so 后缀
set_target_properties(server_simulator PROPERTIES SUFFIX ".so")

target_link_libraries(server_simulator dl)

add_executable(server_demo demo/server_demo.cpp)
target_link_libraries(server_demo server_simulator dl) 